// https://nuxt.com/docs/api/configuration/nuxt-config
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

export default defineNuxtConfig({
  components: [
    {
      path: '~/components/',
      pathPrefix: false
    }
  ],
  app: {
    // 公共页面head设置
    head: {
      charset: 'utf-16',
      title: 'CereShop',
      meta: [
        // <meta name="description" content="My amazing site">
        { name: 'description', content: 'CereShop Zkthink 商城' }
      ]
    },
    // 页面过度设置
    pageTransition: { name: 'page', mode: 'out-in' }
  },
  devtools: { enabled: true },
  // useRuntimeConfig()
  runtimeConfig: {
    public: {
      apiBase: ''
    }
  },
  postcss: {
    plugins: {
      tailwindcss: {},
      autoprefixer: {}
    }
  },
  css: ['~/assets/css/main.css'],
  modules: ['@pinia/nuxt', '@element-plus/nuxt'],
  vite: {
    css: {
      preprocessorOptions: {
        scss: {
          // 每一个scc文件都注入此句import
          additionalData: "@import '@/assets/variable.scss';"
        }
      }
    }
  },
  elementPlus: {},
  extends: []
});
